package com.bzy.common.util;

import com.bzy.common.config.Environment;
import com.bzy.common.util.local.ExceptionUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;


public class LoggerUtil {

	private static final Logger custom = LoggerFactory.getLogger(LoggerUtil.class);


	public static void println(String msg) {
		if (Environment.isDevelopment()) {
			System.out.println(msg);
		}
	}

	public static void println(String msg, Throwable t) {
		if (Environment.isDevelopment()) {
			System.out.println(msg + ", e=" + ExceptionUtil.getExceptionContent(t));
		}
	}

	public static void debug(String log) {
		custom.debug(log);
	}

	public static void debug(String log, Throwable t) {
		custom.debug(log, t);
	}

	public static void info(String log) {
		custom.info(log);
	}

	public static void info(String log, Throwable t) {
		custom.info(log, t);
	}

	public static void warn(String log) {
		custom.warn(log);
	}

	public static void warn(String log, Throwable t) {
		custom.warn(log, t);
	}

	public static void error(String log) {
		custom.error(log);
	}

	public static void error(String log, Throwable t) {
		custom.error(log, t);
	}

	public static void redisLog(String log) {
		custom.info(log);
	}

	public static void redisLog(String log, Throwable t) {
		custom.error(log, t);
	}

	public static void shiroLog(String log) {
		custom.info(log);
	}

	public static void shiroLog(String log, Throwable t) {
		custom.error(log, t);
	}

	public static void loginLog(String log) {
		custom.info(log);
	}
	
	public static void wechatLog(String log) {
		custom.info(log);
	}
	
	public static void main(String[] args) {

	}

}
